<script setup lang="tsx">
import { PropType, ref } from 'vue'
import { Descriptions } from '@/components/Descriptions'

import { useI18n } from '@/hooks/web/useI18n'
import { FormSchema } from '@/components/Form'
const { t } = useI18n()
defineProps({
  currentRow: {
    type: Object as PropType<any>,
    default: () => undefined
  }
})

const detailSchema = ref<FormSchema[]>([
  {
    field: 'stationNo',
    label: t('site.stationNo'),
    component: 'Input'
  },
  {
    field: 'stationName',
    label: t('site.stationName'),
    component: 'Input'
  },
  {
    field: 'stationProtocol',
    label: t('site.stationProtocol'),
    component: 'Input'
  },
  {
    field: 'stationIp',
    label: t('site.stationIp'),
    component: 'Input'
  },
  {
    field: 'stationPort',
    label: t('site.stationPort'),
    component: 'Input'
  },
  {
    field: 'stationKey',
    label: t('site.stationKey'),
    component: 'Input'
  },
  {
    field: 'stationAdmin',
    label: t('site.stationAdmin'),
    component: 'Input'
  },
  {
    field: 'stationIp',
    label: t('site.stationIp'),
    component: 'Input'
  },
  {
    field: 'stationPhone',
    label: t('site.stationPhone'),
    component: 'Input'
  },
  {
    field: 'remark',
    label: t('common.remark'),
    component: 'Input'
  }
  // {
  //   field: 'isOnline',
  //   label: t('menu.status'),
  //   component: 'Select',
  //   componentProps: {
  //     options: [
  //       {
  //         label: t('userDemo.disable'),
  //         value: 0
  //       },
  //       {
  //         label: t('userDemo.enable'),
  //         value: 1
  //       }
  //     ]
  //   }
  // }
])
</script>

<template>
  <Descriptions :schema="detailSchema" :data="currentRow || {}" />
</template>
